
"use client";
import { Suspense, useEffect, useState } from "react";
import Dom from "./Dom";
import { generateWeightedRandomNumber } from "../utils/tool";


export default function TestE() {
    const [pageshow, setPageShow] = useState(false);
    const [state, _setState] = useState({
        arr: []
    });
    const setState = (params: { [key: string]: any }) => {
        _setState((_state) => ({ ..._state, ...params }));
    };
    const { arr } = state;
    useEffect(() => {
        //设置页面加载完成
        setPageShow(true);
        let arr = Array.from({ length: 12 }, () => ({ id:generateWeightedRandomNumber(1,10, 'desc') }))
        setState({
            arr: arr
        })
    }, []);
    console.log(arr)
    return <><main className="min-h-screen" >
    </main>
    </>
}